#ifndef _VECTORFIELD2_RENDER_H
#define _VECTORFIELD2_RENDER_H
/**
 *This class is responsible for dynamically rendering a 2D vector field.
 **/
#include "Ogre.h"
#include "FlowSimHeaders.h"
#include "DynamicLines.h"
#include "VectorField2.h"
namespace FlowSim
{
class VectorField2Render
{
public:
  VectorField2Render(Ogre::SceneManager* scnMgr);
  ~VectorField2Render();
  
  void setInput(VectorField2* vf); //set the input 2d vector field
  void refresh(VectorField2* vf); //refresh render with vf. VF must be same size as old vf.
  void update(); //update the render based on the current vector field.
  
  void addTestVec(Ogre::Vector2 pos, Ogre::Vector2 vec);

protected:
  Ogre::SceneManager* _scnMgr;
  VectorField2* _vf;
  DynamicLines* _lines;
  Ogre::SceneNode* _lineNode;
  int _dij; //change in i and j

  void setupRender(); //setup the render for rendering of the vector field
  void testBiLerp();
  
};
}

#endif
